package com.bookmanger.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bookmanger.common.result.Result;
import com.bookmanger.entity.Book;
import com.bookmanger.entity.dto.BookSearchDTO;
import com.bookmanger.entity.dto.ModifyBook;
import com.bookmanger.entity.select.BookListDTO;
import com.bookmanger.entity.vo.BookCategoryCountVO;
import com.bookmanger.entity.vo.BookListVo;
import com.bookmanger.entity.vo.ListForm;

import java.util.List;

/**
 * @author wei kunJie
 * @date 2024/11/2 14:46:48
 */
public interface BookSearchService extends IService<Book> {
    Result<List<BookSearchDTO>> search(Book book);
    Result<BookSearchDTO> detail(Long bookId);

    Result addBook(BookSearchDTO bookSearchDTO);

    Result updateBook(ModifyBook bookSearch);

    Result groundBook(Long id);

    Result unGroundBook(Long id);

    Result deleteBook(Long id);

    //修改库存
    Integer modifyInventory(Long id, int num);

    Result<ListForm<BookListVo>> getBookList(BookListDTO bookListDTO);

    Result<Integer> getBookCount();

    Result<List<BookCategoryCountVO>> getBookCategoryCount();
}
